home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 2
/
Gold Medal Software Volume 2 (Gold Medal) (1994).iso
/
comms
/
commo552.arj
/
SAMPLES.MAC
< prev
next >
Wrap
Text File
|
1993-10-14
|
10KB
|
251 lines
┌───────────────────────────┐
│ Additional Macro Examples │
└───────────────────────────┘
This file contains a number of sample macros. Feel free to copy any of them
to COMMO.MAC and to alter them to your own needs. Additions will be made to
this file as time permits. Thanks to the users for their contributions.
{COMMO} macros can be made to do many amazing things besides just logging into
BBS's and doing mail runs (those are indeed popular functions, however). Some
of the simplest macros demonstrate this capability.
The first two macros are used for reading messages. They use the grey plus
and minus keys in the lower right corner of the keyboard. The first one sends
a <cr>, then clears the screen. Makes messages a lot easier to read since
each one starts displaying at the top of the screen. The second macro just
sends a <cr>. Nice for keyboards without the extra Enter key.
Message reading macros
───────────────────────────────────────────────────────────────────────────
{:gr+} {send |} {clear} {}
{:gr-} {send |} {}
The next macro is a very important one. It shows the basic method of asking
for a filename and uploading the file. Notice that it first sets the variable
"file" to the upload directory (the variable "uldir"). Then when the INPUt
function executes, the upload directory appears in the input line with a "\".
This macro would execute when Alt-F2 is pressed.
Upload a file using Zmodem (via DSZ)
───────────────────────────────────────────────────────────────────────────
{:af2} {setv file,%uldir\}
{input file,Enter a filename:}
{exec-AW DSZ port %_por sz -m %file} {}
Start my mail reader after a mail run
───────────────────────────────────────────────────────────────────────────
{:cF3} {exec-ns jabber} {} JABBER Reader w/swap
The next two utilities are used in various macros to wait for carrier detect
to drop, then continue dialing (ncr) and to hangup when necessary and continue
dialing (hng):
{:hng}
{pause 3} {hangup y}
{:ncr}
{pause 1} {ifcarrier ncr}
{pause 5} {dial ,} {beep} {}
My generic login macro will login to most popular BBS's. The generic login
subroutine can be called from mail run macros, etc. The GOLOok with the
";passwor" ignores the string "password" in the opening instructions on an
Auntie board. Put {login} in your Dialing Directory macro field.
Generic login macro
───────────────────────────────────────────────────────────────────────────
{:login} {capture y,c:\commo\commo.cap} RBBS, PCBoard, Auntie, etc.
{asci ,} {call gls} {}
Generic login subroutine
───────────────────────────────────────────────────────────────────────────
{:gls} {setlook 60,hng,10,|}
{setv ss_r,~|} {setv ss_yr,~y|}
{:li1} {sslo ss_r,(enter)} {sslo ss_yr,graphics (enter)}
{calo li1,li2,first name} {calo li1,li3,last name}
{sslo ss_yr,is this correct} {golo li1,;passwor}
{lookfor password} {send ~%_pas|} {return}
{:li2} {send ~Fred|} {return}
{:li3} {send ~Brucker|} {return}
Here is a macro using variables to do a mail run on a PCBoard with a MarkMail,
Rosemail or QMail door. It will upload a reply packet if one exists, delete
the packet if the upload is successful, then log off. If there is no reply
packet it will download new messages and log off. At the end it will wait for
carrier detect to drop, then continue multi-number dialing.
The subroutines "mail_up" and "mail_dn" can be changed to use any protocol.
The supplied ones use the Internal Xmodem-1k.
Four variables must be set prior to starting this macro. These can be set in
the Dialing Directory entry or in the Linked Macro. For example, to call
Northern Lights and use the QMail door, the Dialing Directory (all on one
line!) would be:
Northern Lights 12/21/91 {1 207 761 4782} {password} {pcbmail} {} ...
... {bbsid,nlbbs} {maildoor,qmail} {nomsgs,sorry, but no} {ptim,2}
This will set the variables and go direct to "pcbmail."
To use the Linked Macro instead you would have a Dialing Directory entry like:
Northern Lights 12/21/91 {1 207 761 4782} {password} {northern} {}
And then have a Linked Macro such as:
{:northern}
{setv bbsid,nlbbs} Set bbs id
{setv maildoor,qmail} Set door type
{setv nomsgs,sorry, but no} Set message to LOOKfor if no messages
{setv ptim,2} Set prompt timer duration
{goto pcbmail} GOTO the mail run macro
PCBoard generic mailrun
───────────────────────────────────────────────────────────────────────────
{:pcbmail}
{setv ss_yr,y|}
{capt y,c:\commo\%bbsid.%_day} {asci ,}
{setl 30,hng} {golo ,pcboard (r)}
{look ^g} {call gls}
{setl 60,hng,%ptim,n|} {look main board command?}
{setl 120,hng} ** turn off prompt timer
{send open %maildoor|} {look %maildoor command}
{ifex %uldir\%bbsid.rep,,mr_dl} ** if no reply, go to download
{:mr_ul}
{send u|} {look %bbsid.rep} {call mail_up}
{look %maildoor command} {ifcon mr_gb,mr_ul} ** if error, try again
{:mr_dl}
{send d|}
{golo mr_gb,%nomsgs} {sslo ss_yr,when done?}
{sslo ss_yr,(y/n)} {look %bbsid.qwk}
{call mail_dn} {look %maildoor command}
{ifcon ,mr_dl} ** if error, try again
{:mr_gb}
{send g|} {goto hng}
{:mail_dn} {pause 2} {rxmo %dldir\%bbsid.qwk} {comp %_err,0} {return}
{:mail_up} {sxmo-k %uldir\%bbsid.rep} {ifer 1,mu_end}
{exec-N del %uldir\%bbsid.rep}
{:mu_end} {comp %_err,0} {return}
The following macro does a mail run on most WildCat! BBS's with the TomCat!
mail door. The only variables that need to be set are "bbsid" and "ptim."
The "ss_" variables may be set in the Setup File (using the "set" keyword).
** WildCat! generic mailrun
───────────────────────────────────────────────────────────────────────────
{:catmail}
{setv ss_r,|}
{setv ss_y,y}
{setv ss_n,n}
{setv ss_bday,mm-dd-yy|} <- your birthdate
{setv ss_pnum,614-326-1309|} <- your phone number
{setv ss_name,First Last|} <- your name
{capt y,c:\commo\%bbsid.%_day} {asci ,}
{setl 60,hng}
{sslo ss_ee,twice}
{sslo ss_name,first name}
{look password?} {send %_pas|}
{setl 60,hng,%ptim,|}
{sslo ss_r,[c]ontinue}
{sslo ss_r,[enter]}
{sslo ss_n,choice? [ ]}
{sslo ss_bday,birth date}
{sslo ss_pnum,phone number}
{sslo ss_n,bulletin menu?}
{look main menu} {send ~~m}
{look message menu} {send ~~d}
{setl 120,hng} ** turn off prompt timer
{look tomcat menu}
{:wc_dl}
{pause 1} {send d}
{:wc_dl1}
{sslo ss_y,receive this packet}
{golo wc_dl2,nothing found}
{look %bbsid.qwk}
{call mail_dn}
{look tomcat menu}
{ifcon wc_ul,wc_dl} ** if error, try again
{:wc_dl2}
{look tomcat menu}
{:wc_ul}
{ifex %uldir\%bbsid.rep,,wc_bye} ** if no reply, done
{pause 1} {send u}
{:wc_ul1}
{look %bbsid.rep}
{call mail_up}
{look tomcat menu}
{ifcon ,wc_ul} ** if error, try again
{:wc_bye}
{pause 1} {send g} {goto hng}
Here is my mailrun macro for Babble Underground using the MKQwk mail door
under the Remote Access BBS. The variable "dldir" is used as the disk
directory for downloading the .QWK packet, "uldir" for the .REP.
Babble Underground mail run
───────────────────────────────────────────────────────────────────────────
{:babble}
{setv ss_y,y} {setv ss_n,n}
{setv bbsid,babble-u} ** set board ID
{capt y,c:\commo\%bbsid.%_day} {asci ,}
{setl 60,hng}
{look escape twice} {send ^[^[} ** for Front Door
{look real name?} {send Fred Brucker|} <<-- Your name here
{look password:} {send %_pas|}
{sslo ss_n,y/n}
{look command:} {send q} ** open .QWK door
{look command:}
{ifex %uldir\%bbsid.rep,,bu_dl} ** if no reply, go to download
{:bu_ul}
{send u}
{sslo ss_y,yes/no}
{look transfer now}
{call mail_up}
{look command:} {send g~y}
{pause 2} {goto hng}
{:bu_dl}
{setl 600,hng} ** set timeout for download
{send d}
{sslo ss_y,yes/no}
{golo hng,no messages found}
{look transfer now}
{call mail_dn}
{pause 5} {goto hng}
Here is my online quoting macro. It saves the Screen Image File pathname in
the variable "scrsav."
Then it sets the Screen Image File to a temporary file and goes into
Scrollback. In Scrollback I write a block of text to disk (the quote), then
exit. My editor (QEdit) is then executed on the temporary file. I do what I
need there to dress up the quote (like add quoting marks, etc.). When I save
the file and exit the editor, the macro does an ASCII Upload of the file and
deletes it.
Then the Screen Image pathname is restored to what it was before.
Quoting macro
───────────────────────────────────────────────────────────────────────────
{:cf6} {setv scrsav,%_scr} {screen n,%dldir\temp} {scroll}
{exec-N q %_scr} {asci %_scr}
{exec-N del %_scr} {screen n,%scrsav} {}
- end -